<?php
namespace town\base;


// ------------------ guest ------------
Route::get('/', 'Home@index');

Route::get('/post/{id}', 'Post@show');

Route::post('/comment', 'Comment@send');

Route::get('/post_search', 'Post@post_search');



// ------------------ admin ------------
Route::group(function() {
	
	Route::get('peim3', function(){
		return view('back/login');
	});
	Route::post('login', 'User@login');
	Route::get('logout', 'User@logout');
	
	// index
	Route::get('back', 'Back@index');

	// post
	Route::get('post_l', 'Post@post_l');
	Route::get('post_e/{id}', 'Post@post_e');
	Route::post('post_e', 'Post@post_e');
	Route::get('post_d/{id}', 'Post@post_d');

	// tag
	Route::get('tag_l', 'Tags@tag_l');
	Route::get('tag_e/{id}', 'Tags@tag_e');
	Route::post('tag_e', 'Tags@tag_e');
	Route::get('tag_d/{id}', 'Tags@tag_d');

	// 评论
	Route::get('comment_l', 'Comment@comment_l');

	// 访客
	Route::get('guest_l', 'Guest@guest_l');

	// 设置
	Route::get('config', 'Config@config');

}, 'Auth');